package com.jjh.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.jjh.consts.Result;
import com.jjh.pojo.Dish;
import com.jjh.pojo.vo.DishVo;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

public interface DishService {
    Result page(Integer page, Integer size, Map<String, Object> map);


    List<Dish> getByCondition(Map<String,Object> map);

    @Transactional
    Result addDish(DishVo dishVo) throws JsonProcessingException;

    @Transactional
    Result changeStatus(Integer id,Integer status);

    Result getDishInfo(Integer id);

    @Transactional
    Result updateDish(DishVo dishVo) throws JsonProcessingException;

    @Transactional
    Result deleteDishes(List<Integer> ids);

    Result getByCateId(Integer cateId);
}
